package com.devframe.srtp.util.enumobj;
/**
 * 
 * @author zhanbs
 * 枚举的请求动作
 */
public enum EnumSRTPAction {

	NULL("",""),
	/**
	 * 上传文件
	 */
	UPLOAD_FILE("上传文件","uploadFile"),
	/**
	 * 删除文件
	 */
	DELETE_FILE("删除文件","deleteFile"),
	/**
	 * 替换文件
	 */
	REPLACE_FILE("替换文件","replaceFile"),
	/**
	 * 生成缩略图
	 */
	CREATE_THUMB_PICTURE("生成缩略图","createThumbPicture");
	
	
	
	private String value;
	private String name;
	
	EnumSRTPAction(String name,String value){
		this.name=name;
		this.value=value;
	}
	
	public static EnumSRTPAction converByValue(String value){
		if(EnumSRTPAction.UPLOAD_FILE.value.equals(value)){
			return EnumSRTPAction.UPLOAD_FILE;
		}else if(EnumSRTPAction.DELETE_FILE.value.equals(value)){
			return EnumSRTPAction.DELETE_FILE;
		}else if(EnumSRTPAction.REPLACE_FILE.value.equals(value)){
			return EnumSRTPAction.REPLACE_FILE;
		}else if(EnumSRTPAction.CREATE_THUMB_PICTURE.value.equals(value)){
			return EnumSRTPAction.CREATE_THUMB_PICTURE;
		}else{
			return EnumSRTPAction.NULL;
		}
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
}
